JPEG is a standardized image compression algorithm. Traditional JPEG compression of an image includes dividing the image into a grid of non-overlapping 8×8 blocks of pixels, and independently coding each pixel block. The coding of each pixel block includes taking a two-dimensional Discrete Cosine Transform (DCT) to obtain an 8×8 block of DCT coefficients; and quantizing the DCT coefficients. The quantization exploits the following: the low frequency DCT coefficients contain most of the image energy; sensitivity limits of the human visual system vary with spatial frequency (e.g., small high-frequency changes are perceived less accurately than small low-frequency changes); and the human visual system is much more sensitive to high frequency variations in luminance than similar variations in color.
The image may be reconstructed by performing an inverse DCT transform on the quantized coefficients. Because the coefficients are quantized, the reconstructed image does not contain all of the information of the original image.
The reconstructed image can contain artifacts that were not present in the original image. Background texture in the original image may appear as blocks of different shades in the reconstructed image, since each DCT block may be smoothed to a single shade in the reconstructed image. The smoothed blocks are visible in the reconstructed image, and they create new edges and lines in the reconstructed image. These smoothed blocks, and new lines and edges are sometimes referred to as “blocking” artifacts. In addition, edges that are crisp in the original image might have echoes or shadows in the reconstructed image. These echoes and shadows are sometimes referred to as “ringing” artifacts.
The blocking and ringing artifacts can degrade image quality. These artifacts may be especially prominent if the JPEG compression was performed at a low bit rate (i.e., a high compression).
The following method can be used to reduce the visibility of these artifacts in an image that has already been compressed according to the JPEG standard and then reconstructed. The digital image is shifted in horizontal and vertical directions by (i,j). A blocked DCT similar to that used in traditional JPEG is applied to the shifted image to produce DCT coefficients, the DCT coefficients are modified, using for example the original quantization method and table of the original image, an inverse DCT is applied on the modified transform coefficients to produce a reconstructed image, and the reconstructed image is shifted back in the horizontal and vertical directions by (−i,−j). Assuming 8×8 blocked DCT, the JPEG image is shifted by other amounts in the range [−3, . . . , 4]×[−3, . . . , 4]. On each shifted image, a blocked 8×8 DCT and inverse DCT are performed. All reconstructed images are averaged.
One problem with this method is that it is computationally intensive. A total of sixteen 1×8 DCT transforms are performed to transform each image from the spatial domain to the frequency domain, and another sixteen 1×8 DCT transforms are performed to transform blocks from the frequency domain back to the spatial domain Each transform is computationally intensive, placing a heavy computational burden on the image processor. The computational burden is equally as heavy during image reconstruction.
It would be desirable to reduce the computational burden of this method. Reducing the computational burden would reduce the cost of artifact reduction, and it could increase the range of applications for the method.